<?php

namespace app\admin\controller;

use think\Request;
use think\Db;
use think\Controller;
use think\Log;
class Order extends Controller
{
	public function Nopay()
	{   
		$dd=Db::name('inorder')->where('ddzt','待支付')->select();
		//dump($dd);
		$this->assign('dd',$dd);
		return $this->fetch();
	}	
	public function Waitersend()
	{   
		$dd=Db::name('inorder')->where('ddzt'.'.='.'已支付待发货' AND 'ddzt'.'='.'待支付')->select();
		//dump($dd);
		$this->assign('dd',$dd);
		return $this->fetch();
	}	
	public function Alertsend()
	{   
		$dd=Db::name('inorder')->where('ddzt','已签收')->select();
		//dump($dd);
		$this->assign('dd',$dd);
		return $this->fetch();
		return $this->fetch();
	}	
	public function Send($orderid)
	{
		$update=Db::name('inorder')->where('orderid',$orderid)->update(['ddzt'=>'已发货']);
		$this->success('发货成功！','Waitersend');
	}	
	public function delete($orderid)
	{   
		$delete=Db::name('inorder')->where('orderid',$orderid)->delete();
		if($delete){
			$this->success('删除成功！','nopay');
		}
	}	
}